package code.com.java.util.collections;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;


public class CollectionsTest {
	public static void main(String args[]) {
		List<GiftLessonItem> list = new ArrayList<GiftLessonItem>();
		List<Integer> ranList = new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6));
		for(int i=ranList.size();i>0;i--) {
			Random random = new Random(11);
			GiftLessonItem giftLessonItem = null;
	
				int m =random.nextInt(i);			
				int n =ranList.get(m);
				ranList.remove(m);
				if(i>5) {
					 giftLessonItem = new GiftLessonItem(n,null,false);
				}else {
					 giftLessonItem = new GiftLessonItem(n,"www.wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww.com",true);
				}

				list.add(giftLessonItem);
			
			
			
		}
		for(GiftLessonItem gift:list) {
			System.out.println(gift.getLesson());
		}
	}
}
